﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Csla;

namespace CslaHispano.EncapsulatedInvoke.Domain.Entities
{
    [Serializable()]
    public class SystemEditList : BusinessListBase<SystemEditList, SystemEdit>
    {
        #region Data Portal

        private void Child_Fetch(string idSystem)
        {
            //var dal = IoCFactory.Instance.CurrentContainer.Resolve<ISystemEntityRepository>();

            //var data = dal.Fetch(idSystem);
            //var rlce = RaiseListChangedEvents;
            //RaiseListChangedEvents = false;
            //while (data.Read())
            //    Add(DataPortal.FetchChild<SystemEdit>(data));
            //RaiseListChangedEvents = rlce;
        }

        #endregion

        #region Constructor

        private SystemEditList()
        {
            AllowNew = true;
            AllowEdit = true;
            AllowRemove = true;
        }

        #endregion

        #region Factory Methods

        protected override SystemEdit AddNewCore()
        {
            SystemEdit _item = SystemEdit.NewSystemEdit();
            this.Add(_item);
            return _item;
        }

        #endregion

    }
}
